<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>学科成员</title>
<base href="<%=basePath%>" />
<link href="foreground/style/css.css" rel="stylesheet" type="text/css" />
<script type='text/javascript' src='dwr/util.js'></script>
<script type='text/javascript' src='dwr/engine.js'></script>
<script type='text/javascript' src='dwr/interface/MemberService.js'></script>
<script type="text/javascript">
	function getPhoto(param){
		var photo=${"photoPeople"};
		photo.style.display="block";
		photo.style.left=document.body.scrollLeft+event.clientX+"px";
		photo.style.top=document.body.scrollTop+event.clientY+"px";
		MemberService.getById(param,memberscallback);
	}
	function memberscallback(member){
		if(member != null){
			var photo=${"photoPeople"};
			photo.innerHTML="<img src='"+member.mphoto+"' />"
		}else{
			hidePhoto();
		}
	}
	function hidePhoto(){
		var photo=${"photoPeople"};
		photo.style.display="none";
	}
</script>
</head>

<body>
<div class="main">
	<div class="subject_top"></div>
    <div class="main_member">
    	
        <div id="memberdiv1">
        	<ul id="member1">
        		<s:iterator value="#session.member1">
            	<li><a href="findById.action?id=<s:property value="mno" />" onmouseover="getPhoto(<s:property value="mno" />)" onmouseout="hidePhoto()"><s:property value="mname" /></a></li>
            	</s:iterator>
            </ul>
        </div>
       
        <div id="memberdiv2">
        	<ul id="member2">
        		<s:iterator value="#session.member2">
            	<li><a href="findById.action?id=<s:property value="mno" />" onmouseover="getPhoto(<s:property value="mno" />)" onmouseout="hidePhoto()"><s:property value="mname" /></a></li>
            	</s:iterator>
            </ul>
        </div>
        
        <div id="memberdiv3">
        	<ul id="member3">
        		<s:iterator value="#session.member3">
            	<li><a href="findById.action?id=<s:property value="mno" />" onmouseover="getPhoto(<s:property value="mno" />)" onmouseout="hidePhoto()"><s:property value="mname" /></a></li>
            	</s:iterator>
            </ul>
        </div>
    </div>
</div>
<div style="height:300px;"></div>
<div id="photoPeople" style="position:absolute;background-color: white;"></div>
</body>
</html>